<?php
// +----------------------------------------------------------------------
// | Longbing [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright Chengdu longbing Technology Co., Ltd.
// +----------------------------------------------------------------------
// | Website http://longbing.org/
// +----------------------------------------------------------------------
// | Sales manager: +86-13558882532 / +86-13330887474
// | Technical support: +86-15680635005
// | After-sale service: +86-17361005938
// +----------------------------------------------------------------------

namespace app\shortvideo\validate;

use think\Validate;

class ShortvideoValidate extends Validate
{
    protected $rule =   [
        'id'       => 'require',
        'title'    => 'require|max:30',
        'cover'    => 'require',
        'video'    => 'require',
        'describe' => 'require|max:200',
    ];

    protected $message  =   [
        'title.require' => '标题必须',
        'title.max'     => '标题最多不能超过30个字符',
        'describe.require' => '请输入视频描述',
        'describe.max'  => '描述最多不能超过200个字符',
        'cover.require' => '请上传视频封面图',
        'video.require' => '请上传视频文件',

    ];

    protected $scene = [
        'add'  =>  ['title','cover','video','describe'],
        'edit'  =>  ['id','title','cover','video','describe'],
    ];

}